/* el-dialog */
@media (max-width: 768px) {
  .el-dialog {
    width: auto !important;
    margin: 5vw;
  }
}

.el-dialog {
  padding: 0;
  border-radius: var(--el-border-radius-base);
  //height: 80vh;
  z-index: calc(var(--el-z-index) + 10) !important;


  &__header {
    //height: var(--el-header-height);
    //padding: 0;
    //margin-right: 0;
    padding: var(--el-dialog-padding-primary);
    border-bottom: 1px solid var(--el-border-color);

    .el-dialog__title {
      //padding: var(--el-dialog-padding-primary);
      font-size: 17px;
      font-weight: bold;
    }
  }

  &__footer {
    //padding: var(--el-dialog-padding-primary);
    padding: var(--el-padding);
    border-top: 1px solid var(--el-border-color);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  &__body {
    padding: var(--el-dialog-padding-primary);
    //width: 100%;
    //height: 100%;
    //display: flex;
    //flex-flow: column;
    //overflow: hidden;
  }
}

//.el-drawer {
//
//  &__header {
//    padding: var(--el-padding);
//    margin-bottom: var(--el-margin);
//    border-bottom: 1px solid var(--el-border-color);
//  }
//
//  &__footer {
//    padding: var(--el-padding);
//    border-top: 1px solid var(--el-border-color);
//  }
//
//  &__body {
//    overflow: auto;
//    padding: 0;
//  }
//
//  > :first-child {
//    font-size: 17px;
//    font-weight: bold;
//  }
//
//}

/* el-card卡片 */
.el-card {
  position: relative;
  //display: flex;
  //flex-direction: column;
  margin-bottom: var(--el-margin);
  border-radius: var(--el-border-radius-base);
  border: 1px solid var(--el-border-color-light);
  //box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
  transition: var(--el-transition) !important;
  //height: auto;
  width: 100%;
  flex-shrink: 0;
  //z-index: calc(var(--el-z-index)) !important;

  &__header {
    position: relative;
    //height: var(--el-header-height);
    padding: var(--el-padding) !important;

    //.card-header-tag {
    //  position: absolute;
    //  top: 15px;
    //  right: 20px;
    //}
  }

  &__body {
    padding: var(--el-padding);
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    overflow: hidden;
  }
}

/* el-table表格 */
.el-table {
  td {
    .cell {
      .el-image {
        width: 50px;
        height: 50px;
        cursor: pointer;
        border-radius: var(--el-border-radius-base);
      }

      .el-button.is-text + .el-button.is-text {
        margin-left: 0;
      }
    }
  }
}

// el-table 表格样式
.el-table {
  //flex: 1;

  // 修复 safari 浏览器表格错位 https://github.com/HalseySpicy/Geeker-Admin/issues/83
  table {
    width: 100%;
  }

  .el-table__header th {
    height: 45px !important;
    font-size: 15px;
    font-weight: bold;
    color: var(--el-text-color-primary) !important;
    background: var(--el-fill-color-light) !important;
  }

  .el-table__header th.is-leaf {
    .el-checkbox__label {
      font-size: 15px;
      font-weight: bold;
      color: var(--el-text-color-primary) !important;
    }
  }

  .el-table__row {
    //height: 45px !important;
    //font-size: 15px;

    .move {
      cursor: move;

      .el-icon {
        cursor: move;
      }
    }
  }
}

// 设置 el-table 中 header 文字不换行，并省略
.el-table__header .el-table__cell > .cell {
  // white-space: nowrap;
  white-space: wrap;
}

/* el-pagination分页 */
.el-pagination {
  --el-pagination-border-radius: var(--el-border-radius-base);
  justify-content: end;
  margin-top: var(--el-margin);
}

.el-tree {
  padding-top: var(--el-padding);
  //margin-top: var(--el-margin);
  font-size: 16px;

  &.el-tree--highlight-current {
    .el-tree-node.is-current > .el-tree-node__content {
      background-color: var(--el-color-primary-light-9);

      .el-tree-node__label,
      .el-tree-node__expand-icon {
        color: white;
      }

      .is-leaf {
        color: transparent;
      }
    }
  }
}


/* el-menu菜单 */
.el-menu {
  user-select: none;

  .el-sub-menu__title,
  .el-menu-item {
    svg,
    [class*='ri-'] {
      margin-right: 3px;
      margin-left: 0;
    }
  }
}

/* el-tabs--top */
.el-tabs.el-tabs--top {
  .el-tabs__item {
    svg,
    [class*='ri-'] {
      margin-right: 3px;
    }
  }
}

/* el-breadcrumb */
.el-breadcrumb__inner {
  display: flex;
  align-items: center;
  justify-content: center;

  svg,
  [class*='ri-'] {
    margin-right: 3px;
  }
}

/* el-descriptions */
.el-descriptions {
  &__title {
    padding-left: var(--el-padding);
    border-left: 5px solid var(--el-color-primary);
  }

  &__header {
    margin-bottom: var(--el-margin);
  }
}

.el-upload.el-upload--text + .el-button {
  margin-left: 10px;
}

/* el-button按钮 */
.el-button {
  border-radius: var(--el-border-radius-base);

  &:hover,
  &:focus,
  &:active,
  &.is-disabled {
    background-clip: padding-box;
  }

  &.is-round {
    border-radius: var(--el-border-radius-round);
  }

  &.is-circle {
    border-radius: var(--el-border-radius-circle);
  }

  [class*='el-icon-'] + span,
  span + [class*='el-icon-'],
  [class*='ri-'] + span,
  span + [class*='ri-'] {
    margin-left: 3px;
  }
}

a + a,
a + .el-button,
.el-button + a {
  margin-left: 10px;
}

/* 毛玻璃遮罩 */
.el-overlay,
.el-image-viewer__mask {
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2.5px);
  opacity: 1;

  > div {
    backdrop-filter: none;
  }
}

/* v-modal、el-image-viewer__mask遮罩 */
.v-modal {
  z-index: var(--el-z-index);
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(2.5px);
  opacity: 1;
}

/* el-loading-mask遮罩 */
.el-loading-mask {
  z-index: calc(var(--el-z-index) - 10) !important;

  &.is-fullscreen {
    z-index: calc(var(--el-z-index) + 99) !important;
  }
}

/* el-tag */
.el-tag {
  border-radius: var(--el-border-radius-base);
}

/* .el-badge */

.el-badge {
  &__content {
    border: 0;
  }
}

/*  .el-page-header */
.el-page-header {
  margin: 0 0 var(--el-margin) 0;
}

.el-space {
  &__item {
    &:empty {
      display: none;
    }
  }
}

.el-avatar {
  background-color: var(--el-color-primary-light-9) !important;
}

/* el-alert */
.el-alert {
  margin: 0 0 var(--el-margin) 0;

  &.is-light {
    .el-alert__icon,
    .el-alert__close-btn {
      color: currentColor;
    }
  }

  &--success {
    &.is-light {
      color: var(--el-color-success);
      background-color: var(--el-color-success-lighter);
      border: 1px solid var(--el-color-success);
    }

    &.is-dark {
      background-color: var(--el-color-success);
      border: 1px solid var(--el-color-success);
    }
  }

  &--info {
    &.is-light {
      color: var(--el-color-primary);
      background-color: var(--el-color-primary-light-9);
      border: 1px solid var(--el-color-primary);
    }

    &.is-dark {
      background-color: var(--el-color-primary);
      border: 1px solid var(--el-color-primary);
    }
  }

  &--warning {
    &.is-light {
      color: var(--el-color-warning);
      background-color: var(--el-color-warning-lighter);
      border: 1px solid var(--el-color-warning);
    }

    &.is-dark {
      background-color: var(--el-color-warning);
      border: 1px solid var(--el-color-warning);
    }
  }

  &--error {
    &.is-light {
      color: var(--el-color-error);
      background-color: var(--el-color-error-lighter);
      border: 1px solid var(--el-color-error);
    }

    &.is-dark {
      background-color: var(--el-color-error);
      border: 1px solid var(--el-color-error);
    }
  }
}

/* el-color-picker */
.el-color-picker {
  &__trigger {
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 0;
  }

  &__color {
    border: 0;
  }
}

.el-container {
  position: relative;
  overflow: hidden;
}

.el-aside {
  border: 0 !important;
  flex-shrink: 0;
  transition: var(--el-transition);
}


.el-form .el-form-item__label {
  width: 68px;
  // font-weight: bold;
  font-weight: 500;
  height: calc(var(--el-input-height) - 2px) !important;
  //padding: 0 0 0 var(--el-padding);
  line-height: calc(var(--el-input-height) - 2px) !important;
  color: var(--el-color-black);
}


.el-form--inline {
  & .el-input, .el-cascader, .el-select, .el-date-editor, .el-autocomplete {
    min-width: 220px !important;
    width: 220px !important;
  }
}

.el-form {
  .el-form-item {
    .el-form-item__content {
      * {
        //font-size: 16px;
        font-weight: bold;
      }
    }
  }
}

/* 设置 el-input 的宽度默认为 240px */
//.el-form--inline .el-input {
//  min-width: 240px !important;
//}

//.el-input {
//  min-width: 240px !important;
//}



